<template>
  <a-modal
    :footer="null"
    v-bind="$attrs"
    :width="817"
    cancelText="取消"
    okText="确定"
  >
    <a-table :columns="MODULE_TABLE_COLUMNS" :dataSource="dataList"></a-table>
  </a-modal>
</template>
<script lang="ts" setup>
import type { ModuleListVO } from "../../pojo/ModuleListVO";

interface Props {
  dataList: Array<ModuleListVO>;
}

const MODULE_TABLE_COLUMNS = [
  {
    title: "名称",
    key: "name",
    dataIndex: "name",
  },
  {
    title: "图标",
    key: "slug",
    dataIndex: "slug",
  },
  {
    title: "状态",
    key: "status",
    dataIndex: "status",
  },
  {
    title: "能否删除",
    key: "canDelte",
    dataIndex: "canDelete",
  },
  {
    title: "操作",
    key: "action",
  },
];

const props = withDefaults(defineProps<Props>(), {
  dataList: () => [],
});
</script>
